﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QLNoiDungHienThi.aspx.cs" Inherits="WebBanThuoc.admin.QLNoiDungHienThi" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Quản Lý Nội Dung Hiển Thị</title>
    <link rel="shortcut icon" href="../img/admin.ico" />
        <script src="../js/jquery-1.7.2.js" type="text/javascript"></script>
        <script src="../js/jquery.keyfilter.js" type="text/javascript"></script>
        <script src="../js/jquery.maskedinput.js" type="text/javascript"></script>
        <script src="../js/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
        <script src="../js/thai.js" type="text/javascript"></script>
        <script src="../js/colResizable-1.3.min.js" type="text/javascript"></script>
        <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="../style/static.css"/>
        <link rel="stylesheet" type="text/css" href="../style/dangnhap_btn.css"/>
        <link type="text/css" href="../style/flick/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
        <style type="text/css">
            .f_span-74
            {
                width:1100px; 
                float:none;		
                padding: 20px;
            }
            input, textarea {
                -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
                -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
                -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
                -o-transition: border linear 0.2s, box-shadow linear 0.2s;
                transition: border linear 0.2s, box-shadow linear 0.2s;
                line-height: 18px;
                color: #555;
                border: 1px solid #CCC;
                -webkit-border-radius: 3px;
                border-radius: 3px;
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                font-size: 15px;
                height: 20px;
                font-weight: normal;
                width: 358px;
            }
            .inputEmail
            {
                height:24px;
            }
            .thai_font
            {
                font-family:"Helvetica Neue", Helvetica, Arial, sans-serif	
            }
            .thai_font_DN
            {
                font-size:30px;
                font-weight:bold;
                padding:10px 0px 30px;		
                color:#0088CC;
                width:820px;
                float:left;
            }
            .thai_font_lable
            {
                font-size:14px;
                font-weight:bold;
                padding-bottom:3px;
                width: 180px;
                margin-top:5px;
            }
            .thai_font_lable_right
            {
                font-size:14px;
                font-weight:bold;
                padding-bottom:3px;
                width: 140px;
                margin-top:5px;
            }
            div{
                float:left;
            }
        </style>       
        <script language="javascript" type="text/javascript">
            function searchSP(){
                    var data = $('#MaNoiDung').val();
                    if($.trim(data)==''){
                        alert('Nếu Mã nội dung không đúng.');                        
                        $('#MaNoiDung').focus();
                        //return false;
                    } else{
                        $('#frm_TimSP').submit();
                        //return true;
                    }
                }

             <%if (Session["page_NoiDungHienThi_msgSucessFunc"] != null)
                {%>
                alert("<%=Session["page_NoiDungHienThi_msgSucessFunc"] %>");
            <%} %>
            
        </script>
</head>
<body>
    <form name="frm_TimSP" id="frm_TimSP" method="post" runat="server" >
        <% WebBanThuoc.DTO.NoiDungHienThi objND = (WebBanThuoc.DTO.NoiDungHienThi)Session["page_NoiDungHienThi_dataND"]; %>
            <div style="float: none; margin: 20px;" class="f_span-74">
                <div style="width:100%;text-align:center">
                    <div class="thai_font thai_font_DN">QUẢN LÝ NỘI DUNG HIỂN THỊ</div>
                </div>
                <div style="width:100%;text-align:center">&nbsp;</div>
                <div style="width:810px;text-align:left">                    
                    <div style="width:100%;text-align:left">
                        <div style="float:left" class="thai_font_lable">Loại nội dung:</div>
                        <select name="MaNoiDung" id="MaNoiDung" style="width:310px;" onchange="searchSP();">
                            <% System.Collections.Generic.List<WebBanThuoc.DTO.NoiDungHienThi> dataList = Session["page_NoiDungHienThi_list"] as System.Collections.Generic.List<WebBanThuoc.DTO.NoiDungHienThi>;
                               for (int i = 0; i < dataList.Count; i++)
                               {%>
                                <option value="<%=dataList[i].MaNoiDung %>"  <%=(objND == null && i == 0) ? "selected='selected'" : ((objND != null && dataList[i].MaNoiDung == objND.MaNoiDung) ? "selected='selected'" : "")%> ><%=dataList[i].TenNoiDung%></option>
                            <%} %>
                        </select>
                    </div>

                    
                    <div style="width:100%;text-align:left">
                        <div style="float:left" class="thai_font_lable">Nội dung:</div>
                        <div style="width:625px;text-align:left;margin-bottom: 8px;">                        
                            <CKEditor:CKEditorControl CssClass="div" Height="400px" ID="NoiDung" 
                                runat="server" ResizeEnabled="false" Toolbar="Source|-|NewPage|Preview|-|Templates
Cut|Copy|Paste|PasteText|PasteFromWord|-|Print|SpellChecker|Scayt
Form|Checkbox|Radio|TextField|Textarea|Select|Button|ImageButton|HiddenField
Undo|Redo|-|Find|Replace|-|SelectAll|RemoveFormat
/
Bold|Italic|Underline|Strike|-|Subscript|Superscript
NumberedList|BulletedList|-|Outdent|Indent|Blockquote|CreateDiv
Link|Unlink|Anchor
Image|Flash|Table|HorizontalRule|Smiley|SpecialChar|PageBreak|Iframe
JustifyLeft|JustifyCenter|JustifyRight|JustifyBlock
BidiLtr|BidiRtl
/
Styles|Format|Font|FontSize
TextColor|BGColor
Maximize|ShowBlocks|-|About" ></CKEditor:CKEditorControl>
                        </div>
                    </div>
                                                           
                </div>

                    
            </div>
                <div style="width:100%;text-align:right; float: right; display: block; position: fixed; z-index: 4000; bottom:0; background-color:#D7FFEB; left:0px">
                    <div style="float:left;padding-top: 0px;"><a href="/admin/home.aspx" ><img alt="" src="../img/home.png" title="Trang Chủ"/></a></div>                    
                    <div style="float:right;width:68px;">
                        <input type="submit" name="btn_Sua" value="Sửa" onclick="return ModifyProduct();" id="btn_Sua" class="btn btn-large btn-primary" style="margin:5px"/>            
                    </div>                    
                </div>
                <div style="width:100%;text-align:left;padding-top:20px;height:80px">
                    &nbsp;
                </div>            

            <%if (objND != null)
              { %>
                   <script type="text/javascript">
                       $('#div_spMoi').hide();
                   </script>
            <%} %>
            <%Session.Remove("page_NoiDungHienThi_dataND");
              Session.Remove("page_NoiDungHienThi_list");
              Session.Remove("page_NoiDungHienThi_msgSucessFunc"); %>
        </form>
</body>
</html>
